package com.ymttest.business.service;

import org.junit.runner.Description;
import org.junit.runner.manipulation.Filter;

public class BaseTestFilter extends Filter {
	private String methodname;
    public BaseTestFilter(String methodname){
              this.methodname=methodname;
    }
   
    @Override
    public String describe() {
             return methodname+"should test.";
    }

    @Override
    public boolean shouldRun(Description arg0) {
              String name = arg0.getDisplayName().split("\\(")[0].trim();
              if(name.equals((methodname.trim()))){
                       return true;
              }
              return false;
    }
}
